﻿@functions{
    public string GetAntiForgeryToken()
    {
        string cookieToken, formToken;
        AntiForgery.GetTokens(null, out cookieToken, out formToken);
        return cookieToken + ":" + formToken;
    }
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>TagThis.Org
    </title>
    <link rel="icon" href="favicon.ico" type="image/png" />
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/normalize.min.css" rel="stylesheet" />
    <link href="~/Content/main.css" rel="stylesheet" />
    <link href="~/Content/tagit.css" rel="stylesheet" />
    <link href="~/Content/style.css" rel="stylesheet" />

    <script type="text/javascript">
        var isAuth = @User.Identity.IsAuthenticated.ToString().ToLower()
        function externalLogin(n) {
            var f = document.getElementById('socialLogin'); f.provider.value = n; f.submit(); console.log(f.provider.value);
        }
    </script>
</head>
<body ng-app="tagthisorg" ng-controller="MainController">
    @using (@Html.BeginForm("ExternalLogin", "Account", new RouteValueDictionary(new Dictionary<string, object> { { "returnUrl", "/" } }), FormMethod.Post, new Dictionary<string, object> { { "style", "display:none" }, { "id", "socialLogin" } }))
    {       
        @Html.AntiForgeryToken()
        <input id="provider" name="provider" type="hidden" value="" /> 
    }
    <input type="hidden" id="antiForgeryToken" value="@GetAntiForgeryToken()"/>
    @RenderBody()
    <footer>
        @*        <a href="manage">manage</a>*@
        <div class="wrap">
            <div class="feedback">
                Поможете сделать TagThisOrg лучше?
                <br />
                <div class="modal-wrap" ng-controller="reportController">
                    <a href="#">Оставьте отзыв</a>
                    <div class="modal modal-feedback">
                        <form name="feedbackForm" action="#" class="modal-form" ng-submit="submit()" ng-class="{error: IsServerError, success:IsOk}">
                            <input name="subject" ng-model="report.subject" type="text" class="input" placeholder="тема сообщения(не обязательно)">
                            <textarea name="message" ng-model="report.message" class="input" placeholder="сообщение" required></textarea>
                            @if (!User.Identity.IsAuthenticated)
                            {
                                <input name="email" ng-model="report.contact" type="text" class="input" placeholder="ваша почта(не обязательно)">
                            }
                            <div class="status">
                                <div ng-click="submit()" ng-show="feedbackForm.message.$dirty" class="submit button">отправить</div>
                                <div class="success">
                                    <i class="icon icon-ok"></i>Спасибо за ваш отзыв
                                </div>
                                <div class="error">
                                    <i class="icon icon-error"></i>{{ErrorMessage}}
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </footer>
    <script>
        var tagseparator = @Data.Settings.Settings.separatorRegEx 
        var tagseparatorsArray = @Html.Raw(Json.Encode(Data.Settings.Settings.searchSeparators))
    </script>
    <script src="~/Scripts/jquery-2.0.3.js"></script>
    <script src="~/Scripts/jquery-ui-1.10.3.min.js"></script>
    <script src="~/Scripts/html5shiv.js"></script>
    
    <script src="http://code.angularjs.org/1.1.5/angular.min.js"></script>
    <script src="~/Scripts/AngularUI/ui-router.min.js"></script>
    <script src="~/Scripts/app/ng-infinitie-scroll.js"></script>
    @*<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script>*@
    <script src="~/Scripts/app/tag-it.js"></script>
    <script src="~/Scripts/app/main.js"></script>
    <script src="~/Scripts/app/Application.js"></script>
    <script src="~/Scripts/app/controllers.js"></script>


</body>
</html>
